package com.pinusmusic.dao;

import com.pinusmusic.domain.MusicList;
import com.pinusmusic.domain.Singer;

import java.util.List;

public interface MusicListDao {
    /**
     * 添加歌单
     * @param addMusicList
     */
    void addMusicList(MusicList addMusicList);

    /**
     * 删除歌单
     * @param mlid
     */
    void deleteMusicListById(int mlid);

    /**
     * 更新歌单
     * @param updateMusicList
     */
    boolean updateMusicList(MusicList updateMusicList);

    /**
     * 根据id查询歌单
     * @param mlid
     * @return
     */
    MusicList findMusicListByMlid(int mlid);

    /**
     * 获取总数
     * @return
     */
    int getTotalCount();

    /**
     * 分页功能
     * @param start
     * @param rows
     * @return
     */
    List<MusicList> findMusicListByPage(int start, int rows);

    /**
     * 根据id获取歌单图片路径
     * @param mlid
     * @return
     */
    String findPathByMlid(Integer mlid);
    //通过用户id查询该用户的歌单数量
    int getCountByUid(int uid);
    //歌单模糊查询
    List<MusicList> findMusicListsByName(int start, int rows, String name);
    int getLikeCount(String name);

    //2.0
    int findCreatorIdByMlid(Integer mlid);
    List<MusicList> findCreationlistByUid(Integer uid);
    List<MusicList> findCollectedlistByUid(int uid);
    void cancelCollectByMlid(int mlid,int uid);

    boolean isExistByMusiclistnameAndUid(String musiclistname, Integer uid);

    void createList(String musiclistname, Integer uid);

    MusicList findMusicListByMusiclistName(String musiclistname,int uid);

    void collectByMlid(int mlid, int uid);

    boolean isCollected(int mlid, int uid);
}
